home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 008 / plotstok.arc / SCHWABCM.BAS (.txt) < prev    next >
Encoding:
GW-BASIC  |  1985-10-13  |  3.0 KB  |  72 lines

  1. 1  KEY OFF:CLS
  2. 10  ' The program "schwabcm.bas" to calculate the stock commissions charged by
  3. 20  ' Charles Schwab & Co., Inc. based on their rate card of February 1982.
  4. 30  '
  5. 40  ' The rates are:    Transaction               Rate
  6. 50  '                    $0 - 3000               $18+1.2%
  7. 60  '                 $3001 - 7000               $36+0.8%
  8. 70  '                $7001 - 56000               $57+0.3%
  9. 80  '
  10. 90  ' Minimum:  $0.08 per share for 1st 600 shares
  11. 100  '           $0.04 per share for each share thereafter.
  12. 110  '
  13. 120  ' Maximum:  $0.45 per share for orders of 100 or more shares.
  14. 130  '
  15. 140  FIRSTBREAK=3000
  16. 150  SECONDBREAK=7000
  17. 160  THIRDBREAK=56000
  18. 170  FIRSTFIXED=18
  19. 180  SECONDFIXED=36
  20. 190  THIRDFIXED=57
  21. 200  FIRSTRATE=0.012
  22. 210  SECONDRATE=0.008
  23. 220  THIRDRATE=0.003
  24. 230  MINBREAK=600
  25. 240  FIRSTMINCHARGE=0.008
  26. 250  SECONDMINCHARGE=0.004
  27. 260  MAXBREAK=100
  28. 270  MAXCHARGE=0.45
  29. 280  '-----------------data input------------------------------------
  30. 290  PRINT " If you tell this program the number of shares of stock you want to
  31. 300  PRINT " buy and the price of the stock, it will give you the commission
  32. 310  PRINT " charged by Charles Schwab & Co., Inc.
  33. 315  PRINT
  34. 320  INPUT " Number of shares";NUMBEROFSHARES
  35. 325  IF NUMBEROFSHARES<>INT(NUMBEROFSHARES) THEN PRINT "Number of shares must be an integer.":GOTO 315
  36. 330  PRINT "
  37. 335  ON ERROR GOTO 370
  38. 340  INPUT " Price of the stock";PRICE
  39. 345  ON ERROR GOTO 0
  40. 350  TRANSACTION=NUMBEROFSHARES*PRICE
  41. 360  IF TRANSACTION>FIRSTBREAK THEN 500 ELSE 400
  42. 370  PRINT "Price must be entered as pp.ppp instead of as a fraction and without a $ sign.":RESUME 330
  43. 400  BASECOMMISSION=FIRSTFIXED+FIRSTRATE*TRANSACTION
  44. 450  GOTO 1000
  45. 500  IF TRANSACTION>SECONDBREAK THEN 700 ELSE 600
  46. 600  BASECOMMISSION=SECONDFIXED+SECONDRATE*TRANSACTION
  47. 650  GOTO 1000
  48. 700  IF TRANSACTION>THIRDBREAK THEN 900 ELSE 800
  49. 800  BASECOMMISSION=THIRDFIXED+THIRDRATE*TRANSACTION
  50. 850  GOTO 1000
  51. 900  PRINT:PRINT " The transaction cost is $"TRANSACTION". Over $56,000 principal amount the
  52. 910  PRINT "commission charge is 72% below fixed rates in effect prior to 5/1/75 but not
  53. 920  PRINT "less than $225.
  54. 930  GOTO 10000
  55. 1000  IF NUMBEROFSHARES>MINBREAK THEN 1200 ELSE 1100
  56. 1100  MINCOMMISSION=NUMBEROFSHARES*FIRSTMINCHARGE
  57. 1110  GOTO 2000
  58. 1200  MINCOMMISSION=MINBREAK*FIRSTMINCHARGE+(NUMBEROFSHARES-MINBREAK)*SECONDMINCHARGE
  59. 2000  IF NUMBEROFSHARES>=MAXBREAK THEN MAXCOMMISSION=NUMBEROFSHARES*MAXCHARGE ELSE MAXCOMMISSION=65000
  60. 3000  IF BASECOMMISSION>MINCOMMISSION THEN COMMISSION=BASECOMMISSION ELSE COMMISSION=MINCOMMISSION:PRINT:PRINT "This is based on the minimum commission rate."
  61. 3010  IF BASECOMMISSION>MAXCOMMISSION THEN COMMISSION=MAXCOMMISSION:PRINT:PRINT "This is based on the maximum commission rate."
  62. 4000  PRINT:PRINT "The principal amount is $"TRANSACTION".
  63. 4010  PRINT " The commission is $"COMMISSION".
  64. 4020  PRINT " The total amount is $"TRANSACTION+COMMISSION".
  65. 4025  PRINT " The commission is "COMMISSION/TRANSACTION*100"% of the principal amount.
  66. 4027  PRINT " The commission is $"COMMISSION/NUMBEROFSHARES" per share.
  67. 4030  GOTO 10000
  68. 10000  PRINT:PRINT:PRINT "Press any key to enter new data except <Esc> which will end the program.
  69. 10010  X$=INKEY$:IF X$="" THEN 10010 ELSE IF X$=CHR$(27) THEN 20000 ELSE CLS:GOTO 315
  70. 20000  CLS:KEY ON:END
  71. 65000  '         SAVE"schwabcm"
  72.